# A task submitted to an existing cluster.
#
# Runs a task on a existing cluster.
#
# Usage:
#   sky launch -c jq cluster.yaml
#   sky exec -c jq job.yaml

name: job

resources:
  accelerators: K80:0.5

# setup: |
#   conda create -n test python=3.7 -y
#   conda activate test
#   conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch



run: |
  timestamp=$(date +%s)
  conda activate test
  echo "started"
  python -u -c "import torch; a = torch.randn(10000, 10000).cuda(); b = torch.randn(10000, 10000).cuda(); [print((a @ b).sum()) for _ in range(10000000000)]"
  echo "ended"
